; /////////////////////////////////////////////////////////////////////////////
;
;     This file is part of PurePicBasic.
; 
;     PurePicBasic is free software: you can redistribute it And/Or modify
;     it under the terms of the GNU General Public License As published by
;     the Free Software Foundation, either version 3 of the License, Or
;     (at your option) any later version.
; 
;     PurePicBasic is distributed in the hope that it will be useful,
;     but WITHOUT ANY WARRANTY; without even the implied warranty of
;     MERCHANTABILITY Or FITNESS For A PARTICULAR PURPOSE.  See the
;     GNU General Public License For more details.
; 
;     You should have received a copy of the GNU General Public License
;     along With PurePicBasic.  If Not, see <http://www.gnu.org/licenses/>.
;
; /////////////////////////////////////////////////////////////////////////////



; /////////////////////////////////////////////////////////////////////////////
;
; /////////////////////////////////////////////////////////////////////////////
Procedure.i _create_chipset_(chipsetName.s, flashSize.i, ramSize.i, eepromSize.i, nbMemoryBank.i)
  chipset(chipsetName)\flashSize  = flashSize
  chipset(chipsetName)\ramSize    = flashSize
  chipset(chipsetName)\eepromSize = eepromSize
  chipset(chipsetName)\nbBank     = nbMemoryBank
  
  InitializeStructure( chipset(chipsetName)  ,supported_chipset)
  
;   ReDim chipset(chipsetName)\bank(nbMemoryBank)
  
  currentChipset = chipsetName
EndProcedure

; /////////////////////////////////////////////////////////////////////////////
;
; /////////////////////////////////////////////////////////////////////////////
Procedure.b _chipset_exist_(name.s)
  
  If FindMapElement(chipset(), name) <> #False 
    ProcedureReturn #True 
  EndIf 
  
  ProcedureReturn #False 
  
EndProcedure

; /////////////////////////////////////////////////////////////////////////////
;
; /////////////////////////////////////////////////////////////////////////////
Procedure _set_current_chipset_(name.s)
  currentChipset = name
EndProcedure

; /////////////////////////////////////////////////////////////////////////////
;
; /////////////////////////////////////////////////////////////////////////////
Procedure _get_flash_size_()
  ProcedureReturn chipset(currentChipset)\flashSize
EndProcedure


; IDE Options = PureBasic 5.10 Beta 4 (Windows - x64)
; CursorPosition = 61
; FirstLine = 30
; Folding = -
; EnableXP